/*
 * @Author: zxc
 * @Date: 2020-11-16 09:12:45
 * @LastEditTime: 2020-11-16 09:38:45
 * @LastEditors: zxc
 * @Description:享元模式
 */
class Model {
  constructor(sex) {
    this.sex = sex
  }
  takePhoto(underwear) {
    console.log("sex=" + this.sex + "----underwear=" + underwear)
  }
}

let maleModel = new Model("male")
femaleModel = new Model("female")

for (var i = 1; i <= 50; i++) {
  maleModel.takePhoto("underwear" + i)
  femaleModel.takePhoto("underwear" + i)
}
